package com.libui.thirdpartsdk.wechat

import com.libui.thirdpartsdk.SDKInterface
import com.libui.thirdpartsdk.share.ShareInterface
import com.tencent.mm.opensdk.modelmsg.SendMessageToWX
import com.tencent.mm.opensdk.openapi.IWXAPI

class WechatGroupShare(wxApi: IWXAPI?) : WechatShare(wxApi) {
    companion object {
        val builder = object : ShareInterface.Builder {
            override val type: String = "wechatGroup"

            override val title: String = "朋友圈"

            override val icon: String = "wechat-group.png"

            override val selectedIcon: String? = null

            override fun build(sdk: SDKInterface): ShareInterface {
                return WechatGroupShare((sdk as? WechatSDK)?.wxApi)
            }
        }
    }

    override val type: String
        get() = builder.type

    override val title: String
        get() = builder.title

    override val icon: String?
        get() = builder.icon

    override val selectedIcon: String?
        get() = builder.selectedIcon

    override val scene: Int = SendMessageToWX.Req.WXSceneTimeline
}